<?php
/*
 * Created on Dec 1, 2010
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */


class AddressBookDao
{
	private $id;

	private $firstname;
	private $lastname;
	
	private $gender;
	private $customerid;
	private $company;
	private $street;
	private $suburb;
	private $zipcode;
	private $city;
	private $state;
	private $zoneid;
	
	private $countryid;
	private $country;	// name

	private $phoneNumber;

	public function AddressBookDao()
	{
	}
	
	public function setId($id)
	{
		$this->id = $id;
	}
	
	public function getId()
	{
		return $this->id;
	}
	
	public function setFirstName($firstname)
	{
		$this->firstname = $firstname;
	}
	
	public function getFirstName()
	{
		return $this->firstname;
	}
	
	public function setLastName($lastname)
	{
		$this->lastname = $lastname;
	}
	
	public function getLastName()
	{
		return $this->lastname;
	}
	
	public function setCountryid($countryid)
	{
		$this->countryid = $countryid;
	}
	
	public function getCountryid()
	{
		return $this->countryid;
	}
	
	
	public function setGender($gender)
	{
		$this->gender = $gender;
	}
	
	public function getGender()
	{
		return $this->gender;
	}
	
	public function setCustomerid($customerid)
	{
		$this->customerid = $customerid;
	}
	
	public function getCustomerid()
	{
		return $this->customerid;
	}
	
	public function setCompany($company)
	{
		$this->company = $company;
	}
	
	public function getCompany()
	{
		return $this->company;
	}
	
	public function setStreet($street)
	{
		$this->street = $street;
	}
	
	public function getStreet()
	{
		return $this->street;
	}
	
	
	public function setSuburb($suburb)
	{
		$this->suburb = $suburb;
	}
	
	public function getSuburb()
	{
		return $this->suburb;
	}
	
	
	public function setZipcode($zipcode)
	{
		$this->zipcode = $zipcode;
	}
	
	public function getZipcode()
	{
		return $this->zipcode;
	}
	
	
	public function setCity($city)
	{
		$this->city = $city;
	}
	
	public function getCity()
	{
		return $this->city;
	}
	
	
	public function setState($state)
	{
		$this->state = $state;
	}
	
	public function getState()
	{
		return $this->state;
	}
	
	
	public function setZoneid($zoneid)
	{
		$this->zoneid = $zoneid;
	}
	
	public function getZoneid()
	{
		return $this->zoneid;
	}
	
	public function setCountry($country)
	{
		$this->country = $country;
	}
	
	public function getCountry()
	{
		return $this->country;
	}
	
	public function setPhoneNumber($phoneNumber)
	{
		$this->phoneNumber = $phoneNumber;
	}
	
	public function getPhoneNumber()
	{
		return $this->phoneNumber;
	}
	
	public function getArray()
	{
		$data_array = array(
			'customerid'  	=> $this->customerid,
            'gender'      	=> $this->gender,
            'firstname'   	=> $this->firstname,
            'lastname'    	=> $this->lastname,
            'street'     	=> $this->street,
            'suburb'        => $this->suburb,
            'city'          => $this->city,
            'zoneid'        => $this->zoneid,
            'state'         => $this->state,
            'postcode'      => $this->zipcode,
            'countryid'     => $this->countryid,
            'company'     	=> $this->company
		);
		
		return $data_array;
	}
	
	public function setArray($arrAddressBook)
	{
		$this->id			= $arrAddressBook['id'];
		$this->customerid	= $arrAddressBook['customerid'];
		$this->gender    	= $arrAddressBook['gender'];
		$this->firstname 	= $arrAddressBook['firstname'];
		$this->lastname  	= $arrAddressBook['lastname'];
		$this->street    	= $arrAddressBook['street'];
		$this->suburb    	= $arrAddressBook['suburb'];
		$this->city      	= $arrAddressBook['city'];
		$this->zoneid    	= $arrAddressBook['zoneid'];
		$this->state     	= $arrAddressBook['state'];
		$this->zipcode  	= $arrAddressBook['postcode'];
		$this->countryid 	= $arrAddressBook['countryid'];
		$this->country 		= $arrAddressBook['countryname'];
		$this->company   	= $arrAddressBook['company'];
		
		return $arrAddressBook;
	}
}
?>
